#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 100;

int h, w;
ll A[N][N];

int main() {
  cin >> h >> w;
  for (int i = 1; i <= h; i++)
    for (int j = 1; j <= w; j++)
      cin >> A[i][j];

  bool flag = true;
  for (int i1 = 1; i1 <= h; i1++)
    for (int j1 = 1; j1 <= w; j1++)
      for (int i2 = i1 + 1; i2 <= h; i2++)
        for (int j2 = j1 + 1; j2 <= w; j2++)
          if (a[i1][j1] + a[i2][j2] > a[i2][j1] + a[i1][j2])
            flag = false;

  puts(flag ? "Yes" : "No");
  return 0;
}
